A construction machine such as a hydraulic excavator or a wheel loader is equipped with various devices such as a fuel tank, a hydraulic fluid tank, and an engine. When conducting various maintenance work such as replenishment of fuel and hydraulic fluid and adjustment of the various devices, a worker often climbs up onto a high position of a machine body. Owing to this, a walkway for the worker to conduct the maintenance work is secured on an upper surface of the machine body or the like.
A handrail (hand rail) is provided along the walkway for assisting the worker in getting onto and off and walking. For the improvement in safety at the maintenance work and the prevention of falling from the high position during walking, setting a height of the handrail to a predetermined value or more from an installation surface to use the handrail as a safety fence has been advocated. In a case of installing the handrail (safety fence) of the height equal to or larger than the predetermined value on the upper surface of the machine body, the high handrail possibly constitutes an obstacle to transporting the construction machine by a truck or the like. To address the problem, there is proposed a handrail (fence) in which the height of the handrail can be changed by rotating and folding part of the handrail at a halfway in a height direction of the handrail (refer to, for example, Patent Document 1).